package com.cqq.common.core.base;


/**
 * <h3>服务查询对象基类</h3>
 *
 * <p>
 * 所有服务查询对象的基类，实现了序列化接口，重写了 toString() 方法，方便日志输出和调试。
 * 定义了一些公共的查询条件，比如和分页相关的一些变量。
 * </p>
 * 
 * @author xijq
 * @version 1.0.0
 * 
 */
public class BaseQueryBean extends BaseBean {

	private static final long serialVersionUID = 4568744639908493355L;

	private boolean needPaging = true;
	
	private Integer pageSize = 20;
	
	private Integer pageNo = 1;

	private String orderBy;
	
	public boolean isNeedPaging() {
		return needPaging;
	}

	public void setNeedPaging(boolean needPaging) {
		this.needPaging = needPaging;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		if(pageSize==null || pageSize<=0){
			return;
		}
		this.pageSize = pageSize;
	}

	public Integer getPageNo() {
		return pageNo;
	}

	public void setPageNo(Integer pageNo) {
		if(pageNo==null || pageNo<=0){
			return;
		}
		this.pageNo = pageNo;
	}

	public String getOrderBy() {
		return orderBy;
	}

	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}
}
